home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / VD08BIN.ZIP / usr / include / pm / interfacefile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-13  |  2.0 KB  |  95 lines

  1. #ifndef _INTERFACEFILE_H_
  2. #define _INTERFACEFILE_H_
  3.  
  4. #include <util/KeyedList.h>
  5. #include <util/String.h>
  6.  
  7. struct outlet_action_structure {
  8.   char *source;
  9.   char *target;
  10.   char *command;
  11. };
  12.  
  13. typedef struct outlet_action_structure Action;
  14. typedef struct outlet_action_structure Outlet;
  15.  
  16. @interface InterfaceFile : Object <Archiving>
  17. {
  18.   KeyedList  *objects;
  19.   KeyedList  *classes;
  20.   SimpleList *actions;
  21.   SimpleList *outlets;
  22.  
  23.   id  owner;
  24.   HAB hab;
  25. }
  26.  
  27. - init;
  28. - free;          /* only free this object */
  29. - freeObjects;   /* also free objects in the list */
  30. - freeAll;       /* free this object, all objects in list and key strings */
  31.  
  32. /* --------------- Access to the lists storing data --------------- */
  33. - objects;
  34. - classes;
  35. - actions;
  36. - outlets;
  37.  
  38. -setOwner: anObject;
  39. -owner;
  40. -setHab: (HAB) aHab;
  41. -(HAB) hab;
  42.  
  43. - (char *) keyFor: (unsigned long) index;
  44. - objectFor: (unsigned long) index;
  45.  
  46. - (unsigned long) objectCount;
  47. - (unsigned long) classObjectCount;
  48. - (unsigned long) actionCount;
  49. - (unsigned long) outletCount;
  50.  
  51. /*
  52.  * access to objects
  53.  */
  54. - addObject: anObject withTitle: (char *) aKey;
  55. - objectWithTitle: (char *) aTitle;
  56. - deleteObjectWithTitle: (char *) aKey;
  57. - (unsigned long) indexWithTitle: (char *) aKey;
  58. - (unsigned long) indexForObject: anObject;
  59.  
  60. /*
  61.  * access to objects not archived
  62.  */
  63. - addClassObject: (char *) className withTitle: (char *) aKey;
  64. - classObjectWithTitle: (char *) aKey;
  65. - deleteClassObjectWithTitle: (char *) aKey;
  66. - (unsigned long) classObjectIndexWithTitle: (char *) aKey;
  67.  
  68. /*
  69.  * access to outlets
  70.  */
  71. /*- addOutlet: (char *) varName from: (char *) source to: (char *) target;
  72. - deleteOutletAt: (unsigned long) index;
  73. */
  74. -outletsForObject: anObject;
  75. -outletsToObject: anObject;
  76.  
  77. -actionsForObject: anObject;
  78. -actionsToObject: anObject;
  79.  
  80. /*
  81.  * information about objects
  82.  */
  83. -(BOOL) isObjectConnected: anObject;
  84. -deleteConnectionsFor: anObject;
  85.  
  86. - awake;
  87. - read: (TypedStream *) aStream;
  88. - write: (TypedStream *) aStrem;
  89.  
  90. -initializeObjects;
  91.  
  92. @end
  93.  
  94. #endif
  95.